/* 
 * Bitmain Tech, Home of Professional Bitmain Tech
 * Copyright 2014 Bitmain Tech Inc. and/or its affiliates and other contributors
 * as indicated by the @author tags. All rights reserved.
 * See the copyright.txt in the distribution for a
 * full listing of individual contributors.
 */
package com.bitmain.mmst.domain;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.util.List;

import com.bitmain.mmst.core.base.BasicDomain;

/**
 * 领域模型：机架算力概况
 *
 * @author Kweny - enkun.jiang@bitmain.com
 * @since 2016年2月16日
 *
 */
public class ShelfHashrateOverview extends BasicDomain {
	private static final long serialVersionUID = -1305835548533008251L;
	/**
	 * 机架算力概况统计所属年份，分区表用
	 */
	private int year;
	/**
	 * 机架ID
	 */
	private long minerShelfId;
	/**
	 * 机架名称
	 */
	private String minerShelfName;
	/**
	 * 机架矿机总数
	 */
	private int numAll;
	/**
	 * 检测到的矿机数
	 */
	private int numDetail;
	/**
	 * 未检测到的矿机数
	 */
	private int numFailure;
	/**
	 * 算力合格的矿机数
	 */
	private int numPassed;
	/**
	 * 算力不达标的矿机数
	 */
	private int numUnpassed;
	/**
	 * 算力合格率
	 */
	private double ratePassed;
	private String ratePassedD;
	/**
	 * 机架理论总算力(G)
	 */
	private double overallTheory;
	private String overallTheoryD;
	/**
	 * 机架实际总算力(G)
	 */
	private double overallReal;
	private String overallRealD;
	/**
	 * 检测时间
	 */
	private long detectTime;
	/**
	 * 显示用检测时间
	 */
	private String detectTimeDisplay;
	/**
	 * 显示用时区
	 */
	private String timeZoneDisplay;
	
	private List<MinerDetectDetail> details;
	
	private long shelfCreateTime;
	private String ipBlock;
	/**
	 * @return the year
	 */
	public int getYear() {
		return year;
	}

	/**
	 * @param year the year to set
	 */
	public void setYear(int year) {
		this.year = year;
	}

	/**
	 * @return the minerShelfId
	 */
	public long getMinerShelfId() {
		return minerShelfId;
	}

	/**
	 * @param minerShelfId
	 *            the minerShelfId to set
	 */
	public void setMinerShelfId(long minerShelfId) {
		this.minerShelfId = minerShelfId;
	}

	/**
	 * @return the minerShelfName
	 */
	public String getMinerShelfName() {
		return minerShelfName;
	}

	/**
	 * @param minerShelfName
	 *            the minerShelfName to set
	 */
	public void setMinerShelfName(String minerShelfName) {
		this.minerShelfName = minerShelfName;
	}

	/**
	 * @return the numAll
	 */
	public int getNumAll() {
		return numAll;
	}

	/**
	 * @param numAll
	 *            the numAll to set
	 */
	public void setNumAll(int numAll) {
		this.numAll = numAll;
	}

	/**
	 * @return the numDetail
	 */
	public int getNumDetail() {
		return numDetail;
	}

	/**
	 * @param numDetail
	 *            the numDetail to set
	 */
	public void setNumDetail(int numDetail) {
		this.numDetail = numDetail;
	}

	/**
	 * @return the numFailure
	 */
	public int getNumFailure() {
		return numFailure;
	}

	/**
	 * @param numFailure
	 *            the numFailure to set
	 */
	public void setNumFailure(int numFailure) {
		this.numFailure = numFailure;
	}

	/**
	 * @return the numPassed
	 */
	public int getNumPassed() {
		return numPassed;
	}

	/**
	 * @param numPassed
	 *            the numPassed to set
	 */
	public void setNumPassed(int numPassed) {
		this.numPassed = numPassed;
	}

	/**
	 * @return the numUnpassed
	 */
	public int getNumUnpassed() {
		return numUnpassed;
	}

	/**
	 * @param numUnpassed
	 *            the numUnpassed to set
	 */
	public void setNumUnpassed(int numUnpassed) {
		this.numUnpassed = numUnpassed;
	}

	/**
	 * @return the ratePassed
	 */
	public double getRatePassed() {
		return ratePassed;
	}

	/**
	 * @param ratePassed
	 *            the ratePassed to set
	 */
	public void setRatePassed(double ratePassed) {
		this.ratePassed = ratePassed;
		this.ratePassedD = String.valueOf(new BigDecimal(String.valueOf(ratePassed)).multiply(new BigDecimal("100")).doubleValue());
	}

	/**
	 * @return the overallTheory
	 */
	public double getOverallTheory() {
		return overallTheory;
	}

	/**
	 * @param overallTheory
	 *            the overallTheory to set
	 */
	public void setOverallTheory(double overallTheory) {
		this.overallTheory = overallTheory;
		DecimalFormat df = new DecimalFormat("#,##0.00");
		this.overallTheoryD = df.format(overallTheory);
	}

	/**
	 * @return the overallReal
	 */
	public double getOverallReal() {
		return overallReal;
	}

	/**
	 * @param overallReal
	 *            the overallReal to set
	 */
	public void setOverallReal(double overallReal) {
		this.overallReal = overallReal;
		DecimalFormat df = new DecimalFormat("#,##0.00");
		this.overallRealD = df.format(overallReal);
	}

	/**
	 * @return the detectTime
	 */
	public long getDetectTime() {
		return detectTime;
	}

	/**
	 * @param detectTime
	 *            the detectTime to set
	 */
	public void setDetectTime(long detectTime) {
		this.detectTime = detectTime;
	}

	public List<MinerDetectDetail> getDetails() {
		return details;
	}

	public void setDetails(List<MinerDetectDetail> details) {
		this.details = details;
	}

	public String getDetectTimeDisplay() {
		return detectTimeDisplay;
	}

	public void setDetectTimeDisplay(String detectTimeDisplay) {
		this.detectTimeDisplay = detectTimeDisplay;
	}

	public String getTimeZoneDisplay() {
		return timeZoneDisplay;
	}

	public void setTimeZoneDisplay(String timeZoneDisplay) {
		this.timeZoneDisplay = timeZoneDisplay;
	}

	/**
	 * @return the ratePassedD
	 */
	public String getRatePassedD() {
		return ratePassedD;
	}

	/**
	 * @param ratePassedD the ratePassedD to set
	 */
	public void setRatePassedD(String ratePassedD) {
		this.ratePassedD = ratePassedD;
	}

	/**
	 * @return the overallTheoryD
	 */
	public String getOverallTheoryD() {
		return overallTheoryD;
	}

	/**
	 * @param overallTheoryD the overallTheoryD to set
	 */
	public void setOverallTheoryD(String overallTheoryD) {
		this.overallTheoryD = overallTheoryD;
	}

	/**
	 * @return the overallRealD
	 */
	public String getOverallRealD() {
		return overallRealD;
	}

	/**
	 * @param overallRealD the overallRealD to set
	 */
	public void setOverallRealD(String overallRealD) {
		this.overallRealD = overallRealD;
	}

	public long getShelfCreateTime() {
		return shelfCreateTime;
	}

	public void setShelfCreateTime(long shelfCreateTime) {
		this.shelfCreateTime = shelfCreateTime;
	}

	public String getIpBlock() {
		return ipBlock;
	}

	public void setIpBlock(String ipBlock) {
		this.ipBlock = ipBlock;
	}

}
